.badge {
  position: relative;
  vertical-align: middle;
  display: inline-block;
  .badge-content {
    background-color: $danger;
    border-radius: 10px;
    color: $text;
    display: inline-block;
    font-size: 12px;
    height: 18px;
    line-height: 18px;
    padding: 0 6px;
    text-align: center;
    white-space: nowrap;
    border: none;
    &.is-fixed {
      position: absolute;
      top: 4px;
      right: 10px;
      transform: translateY(-50%) translateX(100%);
    }
    &.is-dot {
      height: 8px;
      width: 8px;
      padding: 0;
      right: 5px;
      border-radius: 50%;
    }
  }

  @each $name, $pair in $colors {
    $color: nth($pair, 1);
    $color-invert: nth($pair, 2);
    &.is-#{$name} .badge-content {
      background-color: $color;
      color: $color-invert;
    }
  }
}
